package com.wx.references;

/**
 * 强引用
 * @description:
 * @author: wangxun
 * @createDate: 2021/12/31
 * @version: 1.0
 */
public class StrongReferences {
    public static void main(String[] args) throws InterruptedException {
        Worker worker = new Worker();
        /**
         *  这就是强引用
         *  引用赋null
         *  gc回收
         */
        worker = null;
        System.gc();
        Thread.sleep(2000);

    }
}
